<template>
	<view class="content" v-if="pageShow">
		<view class="mainpadding">
			<template v-if="stateShenHe==0">
				<!-- 審核中 -->
				<view class="aside">
					<image src="/static/images/mine/one.png" mode=""></image>
				</view>
				<view class="text text_a color_jiu margin_top5">
					<view class="">工作人員将會在3個工作日内審核您的提交，</view>
					<!-- <view class=""> 審核通過将會给您生成後台管理帳號密碼，</view> -->
					<view class="">如果審核未通過平台将會给您反饋~</view>
					<view class="">請留意此界面！</view>
				</view>
			</template>
			<template v-if="stateShenHe==1">
				<!-- 審核通過 -->
				<view class="aside">
					<image src="@/static/images/mine/two.png" mode=""></image>
				</view>
				<view class="block2 margin_top5">
					<view class=" text text_a color_jiu">恭喜您，您已經通過審核！</view>
				</view>
				<!-- <view class="mainpadding ffffff border margin_top5">
					<view class="text color_san text_x">帳號：{{dataAll.deliveryExamine}}</view>
					<view class="text color_san text_x margin_top2" @click="linkurl">外送員地址：mot.0966333222.com</view>
				</view> -->
			</template>
			<template v-if="stateShenHe==2">
				<!-- 審核不通過 -->
				<view class="aside">
					<image src="/static/images/mine/three.png" mode=""></image>
				</view>
				<view class="block3 margin_top5">
					<view class="text text_a color_jiu">很遺憾，您没有通過審核!</view>
					<!-- <view class="text text_a color_jiu">
						如有疑問？
						<text style="color: rgba(239, 137, 51, 1);">聯係客服</text>
					</view> -->
					<view class="mainpadding ffffff border margin_top5">
						<view class="text color_san text_x">失敗原因：{{dataAll.feedback}}</view>
					</view>
				</view>
			</template>
		</view>
		<view class="footer" @click="jumpurl" v-if="stateShenHe==3">
			<view class="footerButton">重新提交</view>
		</view>
		<view class="footer" @click="linkurl" v-if="stateShenHe==1">
			<view class="footerButton">進入外送員平台</view>
		</view>
		<!-- <view class="gudingdb" @click="copy" v-if="userinfo.shopapply.status==2">
			<view class="bigbtn">複製信息</view>
		</view> -->
	</view>
</template>

<script>
	// const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				stateShenHe: 0, //審核狀態:0=審核中,1=審核通過,2=審核未通過
				dataAll:{},
				pageShow:false
			}
		},
		onShow() {
			this.getDeliveryInfo()
		},
		methods: {
			async getDeliveryInfo() { //外送員提交認證信息
				let res = await this.http.request('/api/Takeaway/Takedeail', 'GET', {})
				// this.number = res.data.id
				this.stateShenHe=res.data.status
				this.dataAll=res.data
				this.pageShow = true
			},
			linkurl(){
				location.href = "https://mot.opos.tw";
			},
			phone(p) {
				uni.makePhoneCall({
					phoneNumber: p.toString()
				}).catch((e) => {
					// console.log(e)  //用catch(e)来捕獲錯误{makePhoneCall:fail cancel}
				})
			},
			jumpurl() {
				uni.redirectTo({
					url: "/pages_mine/businessSettled"
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.copy {
		margin-left: 30rpx;
		color: RGBA(242, 165, 101, 1);
	}

	.aside {
		margin: 110rpx auto 0;
		width: 306rpx;
		height: 306rpx;

		image {
			width: 100%;
			height: 100%;
		}
	}
</style>